	def buildSubjectList(self, annots = [], mode = "extent_exact", gold = "", strict = True):
		"""Returns a list of extents or links occurring in the corpus"""
		subj, attset, comp = ((re.match(r'[Ee](xtent)?', mode) and (extent, set(['start', 'end', 'text']), (mode[-5:] == "exact" and extent.__eq__ or extent.overlaps)) or (link, set(['fromID', 'toID']), link.__eq__)))
		li = []
		if not annots:
			annots = self.getAnnotators()
		if len(annots) < 1 or (subj == link and not gold):
			return li #make this error more useful
		gHash = bool(gold) and hash(ET.parse(gold).getroot().getchildren()[0].text) or None
		for fname in self.filenames:
			if (subj == link and not gHash == hash(ET.parse(os.join(self.path, fname)).getroot().getchildren()[0].text) or not re.search(self.anpattern, fname)):
				break
			annot = re.search(self.anpattern, fname).group().strip('-.')
			if (not self.phases or (re.search(self.ppattern, fname) and (re.search(self.ppattern, fname).group().strip('-.') in self.phases)) and annot in annots:
				for i in self.getTagNodes(fname):
					if attset.issubset(set(i.attrib.keys())):
						tempsub = subj(annots, i, fname, strict)
						if ((subj == extent) and (len(tempsub) > 0 and tempsub.data['start'] > -1)) or subj == link:
							for sbj in li:
								if comp(tempsub, sbj):
									sbj.add_annot(annot, i.tag)
									break
							else:
								tempsub.add_annot(annot, i.tag)
								li.append(tempsub)
